//
//  UIImage+Extension.m
//  QQ
//
//  Created by 张亚 on 16/1/21.
//  Copyright © 2016年 zhangya. All rights reserved.
//

#import "UIImage+Extension.h"

@implementation UIImage (Extension)

+ (UIImage *)resizableImage:(NSString *)name{
    UIImage * normal = [UIImage imageNamed:name];
    CGFloat w = normal.size.width * 0.5;
    CGFloat h = normal.size.height * 0.5;
    //这是将图片拉伸的一种模式（抽出一个小像素 进行平铺）(也有其他API)
    UIImage * lastNormal = [normal resizableImageWithCapInsets:UIEdgeInsetsMake(w, h, w, h)];
    return lastNormal;
}

@end
